<#if filter.modeltype?? && filter.modeltype != "select" >
<option value="">请选择<#if filter_auto_size??>(${filter_auto_size!''}条上限)<#else>...</#if></option>
<#if filter.reportData?? && filter.reportData.row?? && filter.reportData.row.title??>
	<#list filter.reportData.row.title as titles>
	<#list titles as title>
	<#if title.name??&&title.name?trim!=''>
	<option value="<#if title.getCubeLevel(filter.dataname!'')!=''>${title.getCubeLevel(filter.dataname!'')!''}<#else>${title.name!''}</#if>" <#if filter.curvalue??&&filter.curvalue!='' && (filter.curvalue == title.name || filter.curvalue == title.getCubeLevel(filter.dataname!''))>selected="selected"</#if>><#if title.getCubeLevel(filter.dataname!'')!=''>${title.getCubeLevel(filter.dataname!'')!''}<#else>${title.name!''}</#if></option>
	</#if>
	</#list>
</#list>									
</#if>
<#else>

<input id="input_${filter.id!''}" type="text" data-id="${filter.id}" value="<#if RequestParameters[filter.id]??>${RequestParameters[filter.id]}<#else>${filter.requestvalue!''}</#if>" class="txt_1 txt <#if filter.mustvalue?? && filter.mustvalue=='mustvalue'>required</#if>" onclick="showFilterMenu('${filter.id}');" readonly="readOnly" style="border: 1px solid #09f;height:22px;width:115px !important;padding-left:0px;padding-right:25px;"> 
<a href="javascript:showFilterMenu('${filter.id}')" id="filter_a_${filter.id!''}" style="position: absolute;display: inline;"><i class="selectIco" style="height:15px;"></i> </a>
<div id="filter_menu_${filter.id!''}" class="menuContent" style="display:none; position: absolute;border: 1px solid #09f;width:313px;overflow:auto;;background-color:#FFFFFF;height:180px;z-index:10000;">
	<ul id="tree_${filter.id!''}" class="ztree"></ul>
</div>
<script type="text/javascript">
	<#assign levels = 0 >
	var zNodes_${filter.id!''} =[
		<#if filter.reportData?? && filter.reportData.row?? && filter.reportData.row.title??>
		
		<#if filter_auto_size??>
		<#assign levels = 1 >
		{ id:"0" , pId:"0",open:true,name:"${filter_auto_size!''}条上限",icon:"/assets/images/icon-file-closed.png"}	
		</#if>
		
		<#list filter.reportData.row.title as titles>
		<#list titles as title>
		<#if title.name??&&title.name?trim!=''>
		<#assign levels = levels + 1 >
		<#if levels gt 1 >,</#if>{ id:"${title.getCubeLevel(filter.dataname!'')!''}" , level:'${title.getCubeLevel(filter.dataname!'')!''}', pId:"${title.parent.getCubeLevel(filter.dataname!'')!''}",<#if titles_index==0>open:true,</#if> name:"<label style='display:inline-flex;line-height:10px;padding-top:2px;'><input type='checkbox' data-dimid='${filter.dimid!''}' data-name='${filter.name!''}' data-filter='${filter.id!''}' data-level='<#if title.getCubeLevel(filter.dataname!'') = ''>${title.name!''}<#else>${title.getCubeLevel(filter.dataname!'')}</#if>' data-type='${cube.dstype}'  data-check='true' style='width:14px;height:14px;' <#if filter.requestvalue??&&filter.requestvalue!='' && ((title.getCubeLevel(filter.dataname!'')!='' && filter.requestvalue?index_of(title.getCubeLevel(filter.dataname!'')) gte 0) || (title.getCubeLevel(filter.dataname!'')=='' && title.name != '' && filter.requestvalue?index_of(title.name) gte 0))>checked='true'</#if> onclick='addCheckFilter(this)'> &nbsp;${title.name!''}</label>", icon:"/assets/images/icon-file-closed.png",click:"$('#input_${filter.id}').val('<#if title.getCubeLevel(filter.dataname!'') = ''>${title.name!''}<#else>${title.getCubeLevel(filter.dataname!'')}</#if>')"}
		</#if>
		</#list>
		</#list>									
		</#if>
	 ];
	 $(document).ready(function(){
		$.fn.zTree.init($("#tree_${filter.id!''}"), filterSetting, zNodes_${filter.id!''});
	});
</script>
</#if>